package xiaohong.data.tree.order;

import xiaohong.data.tree.binary.BinaryTree;
import xiaohong.data.tree.binary.TreeNode;

import java.util.*;

public class TreeDemo {

    public static void main(String[] args) {
        TreeNode treeNode = new TreeNode(1, "小宏");
        TreeNode treeNode1 = new TreeNode(2, "最后");
        TreeNode treeNode2 = new TreeNode(3, "拦路雨");
        TreeNode treeNode3 = new TreeNode(4, "钢铁侠");
        TreeNode treeNode4 = new TreeNode(5, "美国队长");
        TreeNode treeNode5 = new TreeNode(6, "怎么始终牵挂");
        TreeNode treeNode6 = new TreeNode(7, "黑寡妇");
        TreeNode treeNode7 = new TreeNode(8, "黑寡妇");
        TreeNode treeNode8 = new TreeNode(9, "灭霸");
        TreeNode treeNode9 = new TreeNode(10, "孙悟空");
        TreeNode treeNode10 = new TreeNode(11, "三太子");
        TreeNode treeNode11 = new TreeNode(12, "东海龙王");
        TreeNode treeNode12 = new TreeNode(13, "张三");
        TreeNode treeNode13 = new TreeNode(14, "李四");
        TreeNode treeNode14 = new TreeNode(15, "王五");
//        TreeNode treeNode15 = new TreeNode(16, "赵六");
        Vector<TreeNode> vector = new Vector<>();
        vector.add(treeNode);
        vector.add(treeNode1);
        vector.add(treeNode2);
        vector.add(treeNode3);
        vector.add(treeNode4);
        vector.add(treeNode5);
        vector.add(treeNode6);
        vector.add(treeNode7);
        vector.add(treeNode8);
        vector.add(treeNode9);
        vector.add(treeNode10);
        vector.add(treeNode11);
        vector.add(treeNode12);
        vector.add(treeNode13);
        vector.add(treeNode14);
//        vector.add(treeNode15);
        ArrayBinaryTree arrayBinaryTree = new ArrayBinaryTree(vector);
        // 1 2 4 8 9 5 10 11 3 5 12 13 6 14 15
        arrayBinaryTree.firstPrint();
//        arrayBinaryTree.middlePrint();
//        arrayBinaryTree.lastPrint();


    }


}
